#include<iostream>
#include<Eigen/Dense>

using namespace Eigen;
using namespace std;

// matrix and vector

int main(int argc,char **argv) {

    // init dynamic matrix , values in [-1,1] size 3*3
    MatrixXd m = MatrixXd::Random(3,3);
    // Eigen  same row and same col can add
    m = (m + MatrixXd::Constant(3,3,1.2)) * 50;

    cout << "m= "<< endl << m << endl;

    VectorXd v(3);
    v << 1,2,3;
    cout << "v= "<< endl << v << endl;
    // vector multiplication
    cout << "m * v = " << endl << m*v <<endl;
    return 0;
}
